import {
  api,
  util
} from "../util";
import authorize from './authorize.js'
const app = getApp();


/**公告之类的 */
var notice = {
  /**
    * 详情
    */
  detail: (id, callback) => {
    var entity = authorize.getEntity();
    var param = {
      Id: id,
      Proprietor: app.dns.proprietor,
      ProprietorId: app.dns.proprietorId
    };
    util.post("cms.notice.detail", param, function (res) {
      res = res.data;
      if (res.Success) {
        if (callback != undefined && typeof (callback) == "function") {
          callback(res.Content[0]);
        }
      } else {
        util.alert(res.Content);
      }
    },"3.0");
  },
}
export {
  notice
}